package org.example.handler;import lombok.SneakyThrows;import java.io.BufferedReader;import java.io.InputStreamReader;import java.io.PrintWriter;import java.net.Socket;import java.util.Date;public class TimeServerHandler implements Runnable {    private Socket socket;    public TimeServerHandler(Socket accept) {        this.socket = accept;    }    @SneakyThrows    @Override    public void run() {        BufferedReader in = new BufferedReader(new InputStreamReader(this.socket.getInputStream()));        PrintWriter out = new PrintWriter(this.socket.getOutputStream(), true);        while (true) {            String body = in.readLine();            if (body == null) break;            System.out.println("the time server receive order:" + body);            String currentTime = "Query Time Order".equalsIgnoreCase(body) ? new Date(System.currentTimeMillis()).toString() : "Bad Order";            out.println(currentTime);        }    }}